#ifndef FONTPAINTER_H
#define FONTPAINTER_H

#include <QFont>
#include <QFontMetricsF>
#include <math.h>

#define TEXT_PADDING 5
#define TEXT_ROW_PADDING 3

class FontPainter
{
public:
    FontPainter();
    ~FontPainter();

    QFont font();
    QFont smallFont();
    QFont italicFont();
    QFont boldFont();

protected:
    QFont _font;
    QFont _smallFont;
    QFont _italicFont;
    QFont _boldFont;
    QFontMetricsF *_fontMetrics;
    QFontMetricsF *_boldFontMetrics;
    QFontMetricsF *_italicFontMetrics;

    qreal stringWidth(QString text);
    qreal boldStringWidth(QString text);
    qreal italicStringWidth(QString text);

    qreal stringHeight();
    qreal boldStringHeight();
    qreal italicStringHeight();

    QRect textRect(QString text);
    QRect boldTextRect(QString text);
    QRect italicTextRect(QString text);
};

#endif // FONTPAINTER_H
